﻿
Option Strict On : Option Explicit On : Option Compare Binary : Option Infer On

Imports System
Imports System.Collections.ObjectModel
Imports System.Text.RegularExpressions


Namespace Code.Coloriser

    ''' <summary>
    ''' Default code coloriser for Batch
    ''' </summary>
    ''' <remarks></remarks>
    Friend Class MshCodeColoriser
        Inherits IColorTokenProvider

        Public Overrides ReadOnly Property CaseSensitive() As Boolean
            Get
                Return False
            End Get
        End Property


        Protected Overrides ReadOnly Property CommentRegexStr() As String
            Get
                Return "#[^\r\n]*"
            End Get
        End Property


        Protected Overrides ReadOnly Property StringOrCharRegexStr() As String
            Get
                Return "@?""""|@?""[^\r\n]*?(?!\\).""|''|'[^\r\n]*?(?!\\).'"
            End Get
        End Property


        Protected Overrides ReadOnly Property Keywords() As String
            Get
                Return "function filter global script local private if else" _
                & " elseif for foreach in while switch continue break" _
                & " return default param begin process end throw trap"
            End Get
        End Property


        Protected Overrides ReadOnly Property Preprocessors() As String
            Get
                Return "-band -bor -match -notmatch -like -notlike -eq -ne" _
                & " -gt -ge -lt -le -is -imatch -inotmatch -ilike" _
                & " -inotlike -ieq -ine -igt -ige -ilt -ile"
            End Get
        End Property

    End Class

End Namespace
